﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<HuynhQuangWebsite.Models.HomeListViewModel>" %>
<%@ Import Namespace="THS.HtmlHelpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Tin tức - sự kiện
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div id="NewsList">
<% Html.RenderPartial("UCNewsList"); %>
</div>

    <%--<section id="subheader">
		<div class="inner">
			<div class="subtitle">
				<h1>Tin tức - kiện</h1>
			</div>
            <div class="subdesc">
			<p>Những tin tức và sự kiện chính của công ty và những thông tin liên quan trong ngành xây dụng dân dụng.A sweet slogan of sub header teaser goes here you can add that from the page edit custom field options below the wordpress content editor.</p>
		</div>
		</div>
	</section>
	<!-- #subheader -->
			
	<section class="pagemid">
		<div class="inner">
			
			<div id="main">
				<div class="entry-content">
     <%if (Model != null)
     {
         if (Model.NewsFocusList != null)
         {
             foreach (var item in Model.NewsFocusList)
             {
                  %>
					<div class="post">
								
							<h2 class="entry-title"><%=Html.FriendlyTextUrl(item.NewsTitle, "Chi_tiet", "Tin_tuc", new RouteValueDictionary { { "id", item.NewsID }, { "title", Url.EncodeFriendlyUrl(item.NewsTitle) } }, null)%></h2>
									
							<div class="post-info">
								<div class="postmeta">
									<span><em>Ngày</em><%=item.AACreateDate.ToString("dd/MM/yyyy")%></span>
									<span><em>Trong</em> <a title="" href="#">Tin tức-sự kiện</a></span>
									<span><em>By</em> <a href="#">hoang.nguyen</a></span>
									<span><a href="#">Leave a comment</a></span>
								</div>
							</div>
							<!-- .post-info -->
								
							<div class="postimg">
								<div class="post_thumb">
                                <%=Html.FriendlyImageUrl(item.NewImgThumb, item.NewsTitle, "Chi_tiet", "Tin_tuc", new RouteValueDictionary { { "id", item.NewsID }, { "title", Url.EncodeFriendlyUrl(item.NewsTitle) } }, null)%>
									<img alt="img" src="../../Images/slider_img1.jpg" />
								</div>
							</div>
							<!-- .postimg -->
							<%if (item.NewsContent.Length > 500)
                             { %>		
							    <p><%=item.NewsContent.Substring(0, 500) + " ..."%></p>
                                <%=Html.FriendlyTextUrl("Đọc thêm...", "Chi_tiet", "Tin_tuc", new RouteValueDictionary { { "id", item.NewsID }, { "title", Url.EncodeFriendlyUrl(item.NewsTitle) } }, new { @class = "more-link" })%>
                            <%}
                             else
                             { %>
                                 <%=item.NewsContent%>
                            <%} %>
					</div>
					<!-- .post -->
							
					<div class="divider_line"></div>
					<%}
         }
     } %>
					<div class="clear"></div>
					<div class="divider_line"></div>
					<div class="pagination wp-pagenavi">
						<span class="pages extend">Page 1  of  2</span>
						<span class="current">1</span>
						<a href="#" class="inactive" >2</a>
                            <%=Ajax.Pager(Model.NewsInfo.CurrentPage, Model.NewsInfo.TotalItems, "NewsList", 0, Model.NewsInfo.ItemsPerPage, "Danh_sach")%>
					</div>					
					<!-- .pagination -->
						
					
				</div>
				<!-- .entry-content -->
			</div>
			<!-- #main -->
						
			<div id="sidebar">
				<div class="widget-area">

					<aside class="syswidget">
						<h3>Custom Text Widget</h3>
						<img src="../../Images/image1.jpg" alt="img" class="imageshadow bottom20" />
						<p>Vestibulum dapibus lacus a elit facilisis posuere. Maecenas eu justo id arcu pharetra pulvinar. Praesent elementum accumsan nibh, a varius elit pretium id. Etiam sagittis, risus [...]</p>
					</aside>
					<!-- .syswidget -->

					<aside class="syswidget">
						<h3 class="widget-title">Categories <span></span></h3>
						<ul>
							<li><a href="#">Blog Magaezine</a></li>
							<li><a href="#">Portfolio</a></li>
							<li><a href="#">web Design</a></li>
							<li><a href="#">Print Media</a></li>
							<li><a href="#">Donec egestas</a></li>								
							<li><a href="#">Quisque</a></li>								
						</ul>
					</aside>
					<!-- .syswidget -->
						
				</div>
				<!-- .widget-area -->
			</div>
			<!-- #sidebar -->
			
		</div>
		<!-- .inner -->
	</section>
	<!-- .pagemid -->--%>
    <script src="../../Scripts/defaults/MicrosoftAjax.js" type="text/javascript"></script>
    <script src="../../Scripts/defaults/MicrosoftMvcAjax.js" type="text/javascript"></script>
</asp:Content>
